﻿using ForgottenTalez.GameStateManager.ScreenMan;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ForgottenTalez.Renderers
{
    class BackgroundRenderer: ScreenRenderer
    {
        Texture2D backgroundTexture;
        public BackgroundRenderer(ScreenManager ScreenManager, Texture2D BackgroundTexture) : base(ScreenManager)
        {
            this.backgroundTexture = BackgroundTexture;
        }

        public override void Render(GameTime gameTime, float TransitionAlpha)
        {
            SpriteBatch spriteBatch = screenManager.SpriteBatch;
            Viewport viewport = screenManager.GraphicsDevice.Viewport;
            Rectangle fullscreen = new Rectangle(0, 0, viewport.Width, viewport.Height);

            spriteBatch.Draw(backgroundTexture, fullscreen,
                             new Color(TransitionAlpha, TransitionAlpha, TransitionAlpha));
            
        }
    }

    
}
